<?php $this->_extends('_layouts/blank_layout'); ?>

<?php $this->_block('title'); ?> - 主机管理<?php $this->_endblock(); ?>

<?php $this->_block('jscript'); ?>
<script type="text/javascript" src="<?php echo $_BASE_DIR; ?>scripts/mootools-1.2.2-core.js"></script>
<script type="text/javascript" src="<?php echo $_BASE_DIR; ?>scripts/mootools-1.2.2.2-more.js"></script>
<script type="text/javascript" src="<?php echo $_BASE_DIR; ?>scripts/checkall.js"></script>
<script type="text/javascript">
//window.addEvent('domready', function() {
//	$('btn1_submit').addEvent('click', function() {
//		var to=0;
//		var numbers = new Array();
//		$$('.check-me').each(function(el) { 
//			if(el.checked)
//			{
//				numbers.push(el.get('value'));
//				//alert(el.get('value'));
//				to++;
//			}
//		});
//		$('hostid').set('value',numbers);
//		$('Form_BlankToGroup').submit();
//		//alert(numbers);
//	});
//});
//	var varse1 = new Object();
//	varse1['startd'] = jQuery("input[name=startdate]").val();
//	varse1['endd'] = jQuery("input[name=enddate]").val();
//	jQuery("#mainPanel_pad").load("index.php?controller=operatereport&action=excel",varse1,function(){
//		//alert('asa');
//	});


jQuery(document).ready(function() {
      
		//alert('121212');
		jQuery('#Form_BlankToGroup').ajaxForm({
				target: '#tip_h',
				success: function(a) {
					jQuery('#tip_h').html('添加成功');
					//jQuery('.goblank').val('');
					freshhostgroup();
					//alert('成功!');
				}
		});
      
    });
</script>
<?php $this->_endblock('jscript'); ?>

<?php $this->_block('contents'); ?>

	<div id="getting-started">
	    <?php $this->_element('blanktogroup_simple',array('form'=>$form)); ?>
		<table>
		<tr><th>全选<input type="checkbox" id="course" onclick="checkItems('course', 'course');allchecked('hostid');"/></th><th>主机名</th><th>MAC地址</th><th>操作系统</th><th>主机IP地址</th><th>创建时间</th><th>主机描述</th></tr>
		<?php foreach ($manage as $s): ?>
		<tr><td><input type="checkbox" class="check-me" name="course" value="<?php echo $s->id;?>" onclick="allchecked('hostid');"/></td><td><?php echo $s->ostype;?></td><td><?php echo $s->macaddress;?></td><td><?php echo $s->ipaddr;?></td><td><?php echo $s->ipaddr;?></td><td><?php echo $s->descript;?></td><td><?php echo $s->datetime;?></td></tr>
		<?php endforeach; ?>
		</table>
	</div>

<?php $this->_endblock('contents'); ?>